<?php
declare (strict_types = 1);

namespace app\model;

use think\Model;

/**
 * @mixin \think\Model
 */
class Hostcat extends Model
{
    //

    public function hostadv(){
        return $this->hasMany(Hostadv::class,'hostcat_id');
    }

    public function hostinfo(){
        return $this->hasOne(Hostinfo::class,'hostcat_id');
    }


    //img 获取器
    public function getImgAttr($value) {
        return request()->domain().'/static/'.$value;
    }
}
